package com.guo.constellation.utils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * @author guo.com

 */
public class URLContent {

    //     星座配对接口
    public static String getParnterURL(String men,String woman){
        men = men.replace("座","");
        woman = woman.replace("座","");
        try {
            men = URLEncoder.encode(men,"UTF-8");
            woman = URLEncoder.encode(woman,"UTF-8");
        } catch (Exception e) {
            e.printStackTrace();
        }
        String url = "http://apis.juhe.cn/xzpd/query?men="+men+"&women="+woman+"&key=55de440e9458d0fb7ecc8774e629bcb6";
        return url;
    }

    //    星座运势接口
    public static String getLuckURL(String name){
        try {
            name = URLEncoder.encode(name,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        String url = "http://web.juhe.cn:8080/constellation/getAll?consName="+name+"&type=year&key=c9a24d104e24220f0675f42dcbff3735";
        return url;

    }
}
